package com.nmsl.nurse.controller;

import com.nmsl.nurse.domain.MPatient;
import com.nmsl.nurse.service.impl.MPatientServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/mpatient")
public class MPatientController {
    @Autowired
    private MPatientServiceImpl mPatientService;


//    查询病人信息和就诊记录
    @RequestMapping("/selectAll")
    public List<MPatient> selectAll(MPatient mPatient) {
        return mPatientService.selectAll(mPatient);
    }

    @RequestMapping("/selectByPrimaryKey")
    public MPatient selectByPrimaryKey(Long id) {
        return mPatientService.selectByPrimaryKey(id);
    }
}
